package com.kofigyan.stateprogressbarsample.not_stateprogressbar.adapter;

import com.kofigyan.stateprogressbarsample.ResourceTable;
import com.kofigyan.stateprogressbarsample.not_stateprogressbar.pojo.ApiFeature;
import ohos.app.Context;
import java.util.List;

public class ApiFeatureAdapter extends BaseListAdapter<ApiFeature> {
    /**
     * 常规列表重写该方法
     *
     * @param context     context
     * @param list        数据源
     * @param listener    Item点击回调
     */
    public ApiFeatureAdapter(Context context, List<ApiFeature> list,
                             OnListItemClickListener<ApiFeature> listener) {
        super(context, list, ResourceTable.Layout_item_api_feature, listener);
    }

    @Override
    public void onBindData(SuperViewHolder holder, int layoutPosition, ApiFeature data) {
        holder.setText(ResourceTable.Id_tvTitle, data.getTitle());
        holder.setText(ResourceTable.Id_tvDescription, data.getDescription());
    }
}
